<template>
  <el-container>
    <el-header background-color="#545c64">
     
    </el-header>
    
    <el-container class="fe-container">
      <el-aside>
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          router
        >
          <el-menu-item index="otable">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>报告修改</span>
            </template>
          </el-menu-item>
          <el-menu-item index="wtable" disabled>
            <i class="el-icon-menu"></i>
            <span slot="title">报文加密</span>
          </el-menu-item>
          <el-menu-item index="selesql" disabled>
            <i class="el-icon-document"></i>
            <span slot="title">入参查询</span>
          </el-menu-item>
          <el-menu-item index="1" disabled>
            <i class="el-icon-setting"></i>
            <span slot="title">导航四</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main><div class="main-header">
          <div class="switch-area">
            <input
              type="checkbox"
              v-model="isCollapse"
              id="switchMenu"
              class="switch-menu"
            />
            <label class="el-icon-s-fold" for="switchMenu"></label>
          </div>
        </div>
        <div class="fe-breadcrumb">
          <fe-breadcrumb></fe-breadcrumb>
        </div>        
        <div class="fe-page">
          <keep-alive>
           <router-view />     
          </keep-alive>
          
        </div>
        <!-- <router-view></router-view> -->
      </el-main>
     
    </el-container>
    <el-footer class="fe-footer">
   
    </el-footer>
  </el-container>
</template>

<script>
import FeBreadcrumb from "@/components/FeBreadcrumb";
// import RouteView from "@/layouts/RouteView";

// import store from "@/store";

// import watermark from "@webank/watermark";
// import globalConfig from "@/config/globalConfig";

export default {
  name: "Basicmeun",
  components: {
   FeBreadcrumb
  },
  data() {
    return {
      isCollapse: false
    };
  },
  computed: {},
  mounted() {
    // this.getUserInfo();
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
    // getUserInfo() {
    //   if (!this.userInfo || Object.keys(this.userInfo).length === 0) {
    //     store.dispatch("user/GetUserInfo").then(res => {
    //       globalConfig.watermark && watermark.init({ maskTxt: res.userName });
    //     });
    //   }
    // }
  }
};
</script>

<style lang="less" scoped>

.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}

/* 设置持续时间和动画函数 */
.slide-fade-enter-active {
  transition: all 0.3s ease;
}
.slide-fade-leave-active {
  transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-fade-enter, .slide-fade-leave-to
  /* .slide-fade-leave-active for below version 2.1.8 */ {
  transform: translateX(30px);
  opacity: 0;
}
.el-aside {
  width: auto !important;
  background: #fff;
  border: 1px solid #e6e6e6;
  .el-menu {
    border: 0;
  }
  .el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 245px;
  }
  .el-submenu__icon-arrow {
    font-size: 18px;
  }
}

.fe-container {
  width: 100%;
  position: absolute;
  top: 70px;
  bottom: 60px;
  .fe-breadcrumb {
    background: #fff;
    padding: 16px 32px;
    border-bottom: 1px solid #e8e8e8;
  }
  .fe-page {
    padding-left: 10px;
    background: #fff;
    padding: 16px 32px;
    min-height: calc(~"100% - 100px");
  }
}
.el-main {
  padding: 0 !important;

  .main-header {
    position: relative;
    padding-top: 9px;
    width: 100%;
    height: 50px;
    background: #fff;
    -webkit-box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  }

  .switch-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 100%;

    input {
      display: none;
      background: transparent;
      outline: none;
    }

    .el-icon-s-fold {
      position: absolute;
      left: 50%;
      top: 50%;
      margin-left: -10px;
      margin-top: -6px;
      cursor: pointer;

      &::before {
        font-size: 20px;
        font-weight: 300;
      }
    }

    input:checked + .el-icon-s-fold {
      &::before {
        content: "\e7bc";
      }
    }
  }
}
.fe-footer {
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
}
</style>
